package com.pimee.web.sys;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.pimee.model.server.Server;
import com.pimee.web.AbstractController;

import io.swagger.annotations.ApiOperation;

/**
 * 服务器监控
 * 
 * @author Bruce Shaw 2020年2月5日 上午2:08:59
 *
 */
@Controller
@RequestMapping("/monitor/server")
public class ServerController extends AbstractController {
	private String prefix = "admin/monitor/server";

	@ApiOperation("进入服务器监控页面")
	@RequiresPermissions("monitor:server:view")
	@GetMapping()
	public String server(ModelMap modelMap) throws Exception {
		Server server = new Server();
		server.copyTo();
		modelMap.put("server", server);
		return prefix + "/server";
	}
}
